<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/chenpeng/common.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

	姓名<input type="text" name="username"/>
	<input type="hidden" name="wage" value="10000"/>
	<input type="button" value="查询">
	<div id="xxx"></div>
</body>
<script type="text/javascript" src="js/jquery-1.4.1.js" ></script>
<script>
	$(function(){
		$(":button").click(function(){
			var username=$("input[name='username']").val();
			var wage=$("input[name='wage']").val();
			//开始
			$.post("json.do",{
				username:username,
				wage:wage
				},function(xx){
					console.log("xx="+xx);
					var  jsonObject =eval("("+xx+")");
					var jieguo="";
					$(jsonObject).each(function(index,data){
						jieguo=jieguo+data.name+"<br/>";
						console.log(data.name);
					});
					$("#xxx").html(jieguo);
				}
			);
			//结束
		});
	});

</script>
</html>